How to host wordpress website on github or gitlab for free.
Today, I am going to tell you how I use gitlab (or you can use github) for host WordPress website for free. Yes, you heard right host WordPress for free. Yay!
I am using gitlab for my free WordPress hosting as you can see. Basically I am using gitlab pages for hosting purpose. If you don’t know already, let me tell you that github and gitlab allows you to host static hosting but not dynamic hosting.
Now you might thinking that github or gitlab allow you only static website so how you will host a dynamic website. Well Keep reading to find out.
To host wodpress website on github, you need to follow below steps carefully.
Install WordPress locally on your system
So the basically the trick is, we will generate static page of our blog from the locally installed wordpress and push all the pages to the git repo and host all the static pages which we will learn how to create them and voila!
This wonderful plug-in will help you to convert your WordPress website to HTML or static website.
Hover over Plugins in your Dashboard and select Add New from the menu.
After that type in the search at right side Simply Static and click on Install and after install click on Activate to activate it.
After activate, see at the left bottom there will be simply static section, hover over and click on settings.
Select Use absolute URLs and then enter your domain name where you will host your website and in the bottom choose where to save files.
Convert WordPress Website to HTML
Finally its time to convert your website to HTML static pages.
Click on Generate in the Simply Static section. Click on Generate Button and Boom your files will save to your directory where you previously saved.
Now you are good to go and upload your files to github repo and turn on your github pages. Wait for some minutes and Congratulations for your new WordPress website for free hosting.
Bonus tip: You can use yoast seo plug-in and other plugins too and they will work good on gihthub.